package com.twopai.framelibrary.mvp;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.annotation.Nullable;

import com.gyf.immersionbar.ImmersionBar;
import com.twopai.mvpbase.BasePresenter;

/**
 * Author:twopai
 * Description:
 */
public abstract class BaseStatusFragment<T extends BasePresenter> extends BaseMvpFragment {
    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initImmersionBar();
        Log.e("ImmersionBar","-->onViewCreated");
    }
    /**
     * 初始化沉浸式
     */
    protected void initImmersionBar() {
        View titleBar = setTitleBarView();
        if (titleBar == null) {
            return;
        }
        //初始化状态栏，避免与状态栏重叠，然后在显示的每个页面分别设置即可
        ImmersionBar.setTitleBar(getActivity(),titleBar);
    }
    protected abstract View setTitleBarView();
}
